Skip to content

[Build Image] Add user-data.sh for Parallelcluster build image and Build/DisableKernelUpdate #6771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

himani2411
Copy link
Contributor

@himani2411 himani2411 commented Apr 1, 2025

Description of changes

  • Add Build/DisableKernelUpdate Parameter in Build Image config file with a default value of true. This Parameter allows customer to disable kernel Update
  • By default it also add a user-data.sh for Image recipes for the instances used in Build Image to disable the kernel packages that cloud config updates.

cloud-config updates kernel packages but not the kernel binary itself

[root@ip-172-31-72-225 ~]# cat /var/log/cloud-init.log | grep yum

Mar 27 14:46:21 cloud-init[2666]: handlers.py[DEBUG]: finish: modules-config/config-yum-add-repo: SUCCESS: config-yum-add-repo ran successfully
Mar 27 14:46:21 cloud-init[2666]: util.py[DEBUG]: Running command ['yum', '-t', '-y', '--exclude=kernel', '--exclude=nvidia*', '--exclude=cuda*', '--security', '--sec-severity=critical', '--sec-severity=important', 'upgrade'] with allowed return codes [0] (shell=False, capture=False)

In oder to Update the kernel below setting is used

  
 Build:
  DisableKernelUpdate: false (Default is true)

Tests

ONGOING

References

  • Link to impacted open issues.
  • Link to related PRs in other packages (i.e. cookbook, node).
  • Link to documentation useful to understand the changes.

Checklist

  • Make sure you are pointing to the right branch.
  • If you're creating a patch for a branch other than develop add the branch name as prefix in the PR title (e.g. [release-3.6]).
  • Check all commits' messages are clear, describing what and why vs how.
  • Make sure to have added unit tests or integration tests to cover the new/modified code.
  • Check if documentation is impacted by this change.

Please review the guidelines for contributing and Pull Request Instructions.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@himani2411 himani2411 added skip-changelog-update Disables the check that enforces changelog updates in PRs 3.x labels Apr 1, 2025
@himani2411 himani2411 requested review from a team as code owners April 1, 2025 13:26
@@ -237,6 +237,7 @@ class ImagebuilderDevSettings(BaseDevSettings):
def __init__(
self,
disable_pcluster_component: bool = None,
disable_user_data: bool = None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name doesn't seem to reflect the actual functionality.

Moreover, why is it necessary to have a separate parameter? This improvement could be added as the default behavior, right?

@himani2411 himani2411 force-pushed the develop-build-image branch from 48d4151 to 99fedbc Compare May 1, 2025 22:12
@himani2411 himani2411 force-pushed the develop-build-image branch from 75273e4 to 15c6569 Compare May 2, 2025 19:40
@himani2411 himani2411 changed the title [Build Image] Add user-data.sh for Parallelcluster build image [Build Image] Add user-data.sh for Parallelcluster build image and Build/DisableKernelUpdate May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x skip-changelog-update Disables the check that enforces changelog updates in PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants